]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Don't try to create shadow for empty texture
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 29 Jun 2017 22:06:53 +0000 (00:06 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 5 Jul 2017 15:10:07 +0000 (17:10 +0200)
Even though the API documentation doesn't say so, the underlying
Cogl texture of a ClutterTexture may be unset, so check for that
case to avoid a runtime warning.

https://bugzilla.gnome.org/show_bug.cgi?id=784353

src/st/st-private.c

index b00a2bdd7268f80590e287ac789234a0f77126ef..0db257aa20f3b7e9229111a2cdb907de5c32dffc 100644 (file)
@@ -420,7 +420,8 @@ _st_create_shadow_pipeline_from_actor (StShadow     *shadow_spec,
       CoglTexture *texture;
 
       texture = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (actor));
-      shadow_pipeline = _st_create_shadow_pipeline (shadow_spec, texture);
+      if (texture)
+        shadow_pipeline = _st_create_shadow_pipeline (shadow_spec, texture);
     }
   else
     {